// $ANTLR 3.0 ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g 2009-03-21 18:52:52

package org.eclipsecon.dui.dsl.binding.parser;

import org.eclipse.emf.common.util.Enumerator;
import org.eclipse.emf.ecore.EObject;

import org.openarchitectureware.xtext.parser.impl.AntlrUtil;
import org.openarchitectureware.xtext.XtextFile;
import org.openarchitectureware.xtext.parser.impl.EcoreModelFactory;
import org.openarchitectureware.xtext.parser.ErrorMsg;
import org.openarchitectureware.xtext.parser.model.ParseTreeManagerNeu;
import org.openarchitectureware.xtext.parser.parsetree.Node;

import org.eclipsecon.dui.dsl.binding.MetaModelRegistration;



import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.util.HashMap;
public class bindParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "RULE_STRING", "RULE_ID", "RULE_INT", "RULE_WS", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "'ui'", "':'", "'domain'", "'->'", "'bind'", "'to'", "'match'", "'('", "')'", "'.'", "'pattern'", "'warning'", "'error'"
    };
    public static final int RULE_ID=5;
    public static final int RULE_STRING=4;
    public static final int RULE_INT=6;
    public static final int RULE_WS=7;
    public static final int RULE_SL_COMMENT=9;
    public static final int EOF=-1;
    public static final int RULE_ML_COMMENT=8;

        public bindParser(TokenStream input) {
            super(input);
            ruleMemo = new HashMap[15+1];
         }
        

    public String[] getTokenNames() { return tokenNames; }
    public String getGrammarFileName() { return "..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g"; }



    	private Token getLastToken() {
    		return input.LT(-1);
    	}

    	protected Object convert(Object arg) {
    		if (arg instanceof org.antlr.runtime.Token) {
    			Token t = (Token) arg;
    			String s = t.getText();
    			if (t.getType() == bindLexer.RULE_ID && s.startsWith("^")) {
    				return s.substring(1);
    			} else if (t.getType()==bindLexer.RULE_STRING) {
    				return s.substring(1,s.length()-1);
    			} else if (t.getType()==bindLexer.RULE_INT) {
    				return Integer.valueOf(s);
    			}
    			return s;
    		}
    		return arg;
    	}


    	private EcoreModelFactory factory = new EcoreModelFactory(MetaModelRegistration.getEPackage());
        private ParseTreeManagerNeu ptm = new ParseTreeManagerNeu();
    	private XtextFile xtextfile = MetaModelRegistration.getXtextFile();
    	
    	{
    			factory.addImport("", "http://www.eclipse.org/emf/2002/Ecore");
    			factory.addImport("db", "http://eclipsecon.org/2009/databinding");
    			factory.addImport("ui", "http://eclipsecon.org/2009/dui");
    		
    	}

    	public ParseTreeManagerNeu getResult() {
    		return ptm;
    	}

    	private List<ErrorMsg> errors = new ArrayList<ErrorMsg>();
    	public List<ErrorMsg> getErrors() {
    		return errors;
    	}

    	@Override
    	public void reportError(RecognitionException e) {
    		String msg = super.getErrorMessage(e,tokenNames);
    		errors.add(AntlrUtil.create(msg,e,tokenNames));
    		ptm.addError(msg, e);
    		// This doesn't work. ANTLR may simply report an superfluous token. In that case,
    		// two nodes will be finished instead of one.
    		// ptm.ruleFinished(null, end());
    	}

        private boolean skipCurrentToken;
        
    	@Override
    	protected boolean recoverFromMismatchedElement(IntStream arg0, RecognitionException arg1, BitSet arg2) {
    		skipCurrentToken = true;
    		return super.recoverFromMismatchedElement(arg0, arg1, arg2);
    	}



    // $ANTLR start parse
    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:104:1: parse returns [Node r] : result= ruleDModel EOF ;
    public Node parse() throws RecognitionException {
        Node r = null;
        int parse_StartIndex = input.index();
        EObject result = null;


        try {
            if ( backtracking>0 && alreadyParsedRule(input, 1) ) { return r; }
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:105:3: (result= ruleDModel EOF )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:105:3: result= ruleDModel EOF
            {
            pushFollow(FOLLOW_ruleDModel_in_parse67);
            result=ruleDModel();
            _fsp--;
            if (failed) return r;
            if ( backtracking==0 ) {

              if (result != null)
                ptm.setModelElement(result);
              r = ptm.getCurrent();
              ptm.ruleFinished(result);
            }
            match(input,EOF,FOLLOW_EOF_in_parse78); if (failed) return r;

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
            if ( backtracking>0 ) { memoize(input, 1, parse_StartIndex); }
        }
        return r;
    }
    // $ANTLR end parse


    // $ANTLR start ruleDModel
    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:115:1: ruleDModel returns [EObject result] : ( ( 'ui' ) ( ':' ) ( RULE_STRING ) ( 'domain' ) ( ':' ) ( RULE_STRING ) ( '->' ) ( RULE_ID ) (temp_DBinding= ruleDBinding )* ) ;
    public EObject ruleDModel() throws RecognitionException {
        EObject result = null;
        int ruleDModel_StartIndex = input.index();
        EObject temp_DBinding = null;


        boolean hasContent = false;
        try {
            if ( backtracking>0 && alreadyParsedRule(input, 2) ) { return result; }
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:118:4: ( ( ( 'ui' ) ( ':' ) ( RULE_STRING ) ( 'domain' ) ( ':' ) ( RULE_STRING ) ( '->' ) ( RULE_ID ) (temp_DBinding= ruleDBinding )* ) )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:118:4: ( ( 'ui' ) ( ':' ) ( RULE_STRING ) ( 'domain' ) ( ':' ) ( RULE_STRING ) ( '->' ) ( RULE_ID ) (temp_DBinding= ruleDBinding )* )
            {
            if ( backtracking==0 ) {

              				result = factory.create("db", "DModel");
              			 
            }
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:121:1: ( ( 'ui' ) ( ':' ) ( RULE_STRING ) ( 'domain' ) ( ':' ) ( RULE_STRING ) ( '->' ) ( RULE_ID ) (temp_DBinding= ruleDBinding )* )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:121:2: ( 'ui' ) ( ':' ) ( RULE_STRING ) ( 'domain' ) ( ':' ) ( RULE_STRING ) ( '->' ) ( RULE_ID ) (temp_DBinding= ruleDBinding )*
            {
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:121:2: ( 'ui' )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:121:3: 'ui'
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,10,FOLLOW_10_in_ruleDModel104); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(3)).eContents().get(1)).eContents().get(0)));
                ptm.ruleFinished(getLastToken());
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:127:1: ( ':' )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:127:2: ':'
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,11,FOLLOW_11_in_ruleDModel111); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(3)).eContents().get(1)).eContents().get(1)));
                ptm.ruleFinished(getLastToken());
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:133:1: ( RULE_STRING )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:133:2: RULE_STRING
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleDModel120); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                Token temp = getLastToken();
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(3)).eContents().get(1)).eContents().get(2)));
                factory.set(result,"uiModel",convert(temp),false);
                ptm.ruleFinished(temp);
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:144:1: ( 'domain' )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:144:2: 'domain'
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,12,FOLLOW_12_in_ruleDModel129); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(3)).eContents().get(1)).eContents().get(3)));
                ptm.ruleFinished(getLastToken());
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:150:1: ( ':' )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:150:2: ':'
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,11,FOLLOW_11_in_ruleDModel136); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(3)).eContents().get(1)).eContents().get(4)));
                ptm.ruleFinished(getLastToken());
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:156:1: ( RULE_STRING )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:156:2: RULE_STRING
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,RULE_STRING,FOLLOW_RULE_STRING_in_ruleDModel145); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                Token temp = getLastToken();
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(3)).eContents().get(1)).eContents().get(5)));
                factory.set(result,"domainModel",convert(temp),false);
                ptm.ruleFinished(temp);
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:167:1: ( '->' )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:167:2: '->'
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,13,FOLLOW_13_in_ruleDModel154); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(3)).eContents().get(1)).eContents().get(6)));
                ptm.ruleFinished(getLastToken());
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:173:1: ( RULE_ID )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:173:2: RULE_ID
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleDModel162); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                Token temp = getLastToken();
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(3)).eContents().get(1)).eContents().get(7)));
                factory.set(result,"modelRootType",convert(temp),true);
                ptm.ruleFinished(temp);
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:184:1: (temp_DBinding= ruleDBinding )*
            loop1:
            do {
                int alt1=2;
                int LA1_0 = input.LA(1);

                if ( (LA1_0==14) ) {
                    alt1=1;
                }


                switch (alt1) {
            	case 1 :
            	    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:184:2: temp_DBinding= ruleDBinding
            	    {
            	    if ( backtracking==0 ) {
            	      ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(3)).eContents().get(1)).eContents().get(8)));
            	    }
            	    pushFollow(FOLLOW_ruleDBinding_in_ruleDModel174);
            	    temp_DBinding=ruleDBinding();
            	    _fsp--;
            	    if (failed) return result;
            	    if ( backtracking==0 ) {
            	      if (temp_DBinding != null) {
            	        hasContent = true;
            	        ptm.setModelElement(temp_DBinding);
            	        factory.add(result,"bindings",convert(temp_DBinding),false);
            	        ptm.ruleFinished(temp_DBinding);
            	      } else {
            	        ptm.destroyNode();
            	      }

            	    }

            	    }
            	    break;

            	default :
            	    break loop1;
                }
            } while (true);


            }

            if ( backtracking==0 ) {
              if (!hasContent)
                result = null;
            }

            }

        }
        catch (RecognitionException re) {
            if (!hasContent)
                result = null;
            reportError(re);
            recover(input,re);
        }
        finally {
            if ( backtracking>0 ) { memoize(input, 2, ruleDModel_StartIndex); }
        }
        return result;
    }
    // $ANTLR end ruleDModel


    // $ANTLR start ruleDBinding
    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:203:1: ruleDBinding returns [EObject result] : (temp_dcontrolbinding= ruleDControlBinding | temp_dtemplatebinding= ruleDTemplateBinding );
    public EObject ruleDBinding() throws RecognitionException {
        EObject result = null;
        int ruleDBinding_StartIndex = input.index();
        EObject temp_dcontrolbinding = null;

        EObject temp_dtemplatebinding = null;


        try {
            if ( backtracking>0 && alreadyParsedRule(input, 3) ) { return result; }
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:205:9: (temp_dcontrolbinding= ruleDControlBinding | temp_dtemplatebinding= ruleDTemplateBinding )
            int alt2=2;
            int LA2_0 = input.LA(1);

            if ( (LA2_0==14) ) {
                int LA2_1 = input.LA(2);

                if ( (LA2_1==RULE_ID) ) {
                    alt2=1;
                }
                else if ( (LA2_1==17) ) {
                    alt2=2;
                }
                else {
                    if (backtracking>0) {failed=true; return result;}
                    NoViableAltException nvae =
                        new NoViableAltException("203:1: ruleDBinding returns [EObject result] : (temp_dcontrolbinding= ruleDControlBinding | temp_dtemplatebinding= ruleDTemplateBinding );", 2, 1, input);

                    throw nvae;
                }
            }
            else {
                if (backtracking>0) {failed=true; return result;}
                NoViableAltException nvae =
                    new NoViableAltException("203:1: ruleDBinding returns [EObject result] : (temp_dcontrolbinding= ruleDControlBinding | temp_dtemplatebinding= ruleDTemplateBinding );", 2, 0, input);

                throw nvae;
            }
            switch (alt2) {
                case 1 :
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:205:9: temp_dcontrolbinding= ruleDControlBinding
                    {
                    pushFollow(FOLLOW_ruleDControlBinding_in_ruleDBinding211);
                    temp_dcontrolbinding=ruleDControlBinding();
                    _fsp--;
                    if (failed) return result;
                    if ( backtracking==0 ) {
                      result =temp_dcontrolbinding;
                    }

                    }
                    break;
                case 2 :
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:205:91: temp_dtemplatebinding= ruleDTemplateBinding
                    {
                    pushFollow(FOLLOW_ruleDTemplateBinding_in_ruleDBinding226);
                    temp_dtemplatebinding=ruleDTemplateBinding();
                    _fsp--;
                    if (failed) return result;
                    if ( backtracking==0 ) {
                      result =temp_dtemplatebinding;
                    }

                    }
                    break;

            }
        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
            if ( backtracking>0 ) { memoize(input, 3, ruleDBinding_StartIndex); }
        }
        return result;
    }
    // $ANTLR end ruleDBinding


    // $ANTLR start ruleDControlBinding
    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:207:1: ruleDControlBinding returns [EObject result] : ( ( 'bind' ) ( RULE_ID ) ( 'to' ) (temp_PathElement= rulePathElement ) ( ( 'match' ) (temp_Validator= ruleValidator ) )? ) ;
    public EObject ruleDControlBinding() throws RecognitionException {
        EObject result = null;
        int ruleDControlBinding_StartIndex = input.index();
        EObject temp_PathElement = null;

        EObject temp_Validator = null;


        boolean hasContent = false;
        try {
            if ( backtracking>0 && alreadyParsedRule(input, 4) ) { return result; }
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:210:4: ( ( ( 'bind' ) ( RULE_ID ) ( 'to' ) (temp_PathElement= rulePathElement ) ( ( 'match' ) (temp_Validator= ruleValidator ) )? ) )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:210:4: ( ( 'bind' ) ( RULE_ID ) ( 'to' ) (temp_PathElement= rulePathElement ) ( ( 'match' ) (temp_Validator= ruleValidator ) )? )
            {
            if ( backtracking==0 ) {

              				result = factory.create("db", "DControlBinding");
              			 
            }
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:213:1: ( ( 'bind' ) ( RULE_ID ) ( 'to' ) (temp_PathElement= rulePathElement ) ( ( 'match' ) (temp_Validator= ruleValidator ) )? )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:213:2: ( 'bind' ) ( RULE_ID ) ( 'to' ) (temp_PathElement= rulePathElement ) ( ( 'match' ) (temp_Validator= ruleValidator ) )?
            {
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:213:2: ( 'bind' )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:213:3: 'bind'
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,14,FOLLOW_14_in_ruleDControlBinding254); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(7)).eContents().get(1)).eContents().get(0)));
                ptm.ruleFinished(getLastToken());
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:219:1: ( RULE_ID )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:219:2: RULE_ID
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleDControlBinding262); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                Token temp = getLastToken();
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(7)).eContents().get(1)).eContents().get(1)));
                factory.set(result,"control",convert(temp),true);
                ptm.ruleFinished(temp);
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:230:1: ( 'to' )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:230:2: 'to'
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,15,FOLLOW_15_in_ruleDControlBinding271); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(7)).eContents().get(1)).eContents().get(2)));
                ptm.ruleFinished(getLastToken());
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:236:1: (temp_PathElement= rulePathElement )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:236:2: temp_PathElement= rulePathElement
            {
            if ( backtracking==0 ) {
              ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(7)).eContents().get(1)).eContents().get(3)));
            }
            pushFollow(FOLLOW_rulePathElement_in_ruleDControlBinding281);
            temp_PathElement=rulePathElement();
            _fsp--;
            if (failed) return result;
            if ( backtracking==0 ) {
              if (temp_PathElement != null) {
                hasContent = true;
                ptm.setModelElement(temp_PathElement);
                factory.set(result,"path",convert(temp_PathElement),false);
                ptm.ruleFinished(temp_PathElement);
              } else {
                ptm.destroyNode();
              }

            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:248:1: ( ( 'match' ) (temp_Validator= ruleValidator ) )?
            int alt3=2;
            int LA3_0 = input.LA(1);

            if ( (LA3_0==16) ) {
                alt3=1;
            }
            switch (alt3) {
                case 1 :
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:248:2: ( 'match' ) (temp_Validator= ruleValidator )
                    {
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:248:2: ( 'match' )
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:248:3: 'match'
                    {
                    if ( backtracking==0 ) {
                      skipCurrentToken = false;
                    }
                    match(input,16,FOLLOW_16_in_ruleDControlBinding290); if (failed) return result;
                    if ( backtracking==0 ) {
                      if (!skipCurrentToken) {
                        hasContent = true;
                        ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(7)).eContents().get(1)).eContents().get(4)).eContents().get(0)));
                        ptm.ruleFinished(getLastToken());
                      }
                    }

                    }

                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:254:1: (temp_Validator= ruleValidator )
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:254:2: temp_Validator= ruleValidator
                    {
                    if ( backtracking==0 ) {
                      ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(7)).eContents().get(1)).eContents().get(4)).eContents().get(1)));
                    }
                    pushFollow(FOLLOW_ruleValidator_in_ruleDControlBinding300);
                    temp_Validator=ruleValidator();
                    _fsp--;
                    if (failed) return result;
                    if ( backtracking==0 ) {
                      if (temp_Validator != null) {
                        hasContent = true;
                        ptm.setModelElement(temp_Validator);
                        factory.set(result,"validator",convert(temp_Validator),false);
                        ptm.ruleFinished(temp_Validator);
                      } else {
                        ptm.destroyNode();
                      }

                    }

                    }


                    }
                    break;

            }


            }

            if ( backtracking==0 ) {
              if (!hasContent)
                result = null;
            }

            }

        }
        catch (RecognitionException re) {
            if (!hasContent)
                result = null;
            reportError(re);
            recover(input,re);
        }
        finally {
            if ( backtracking>0 ) { memoize(input, 4, ruleDControlBinding_StartIndex); }
        }
        return result;
    }
    // $ANTLR end ruleDControlBinding


    // $ANTLR start ruleDTemplateBinding
    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:274:1: ruleDTemplateBinding returns [EObject result] : ( ( 'bind' ) ( '(' ) ( RULE_ID ) ( ')' ) ( RULE_ID ) ( 'to' ) (temp_PathElement= rulePathElement ) ( ( 'match' ) (temp_Validator= ruleValidator ) )? ) ;
    public EObject ruleDTemplateBinding() throws RecognitionException {
        EObject result = null;
        int ruleDTemplateBinding_StartIndex = input.index();
        EObject temp_PathElement = null;

        EObject temp_Validator = null;


        boolean hasContent = false;
        try {
            if ( backtracking>0 && alreadyParsedRule(input, 5) ) { return result; }
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:277:4: ( ( ( 'bind' ) ( '(' ) ( RULE_ID ) ( ')' ) ( RULE_ID ) ( 'to' ) (temp_PathElement= rulePathElement ) ( ( 'match' ) (temp_Validator= ruleValidator ) )? ) )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:277:4: ( ( 'bind' ) ( '(' ) ( RULE_ID ) ( ')' ) ( RULE_ID ) ( 'to' ) (temp_PathElement= rulePathElement ) ( ( 'match' ) (temp_Validator= ruleValidator ) )? )
            {
            if ( backtracking==0 ) {

              				result = factory.create("db", "DTemplateBinding");
              			 
            }
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:280:1: ( ( 'bind' ) ( '(' ) ( RULE_ID ) ( ')' ) ( RULE_ID ) ( 'to' ) (temp_PathElement= rulePathElement ) ( ( 'match' ) (temp_Validator= ruleValidator ) )? )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:280:2: ( 'bind' ) ( '(' ) ( RULE_ID ) ( ')' ) ( RULE_ID ) ( 'to' ) (temp_PathElement= rulePathElement ) ( ( 'match' ) (temp_Validator= ruleValidator ) )?
            {
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:280:2: ( 'bind' )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:280:3: 'bind'
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,14,FOLLOW_14_in_ruleDTemplateBinding342); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(8)).eContents().get(1)).eContents().get(0)));
                ptm.ruleFinished(getLastToken());
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:286:1: ( '(' )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:286:2: '('
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,17,FOLLOW_17_in_ruleDTemplateBinding349); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(8)).eContents().get(1)).eContents().get(1)));
                ptm.ruleFinished(getLastToken());
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:292:1: ( RULE_ID )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:292:2: RULE_ID
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleDTemplateBinding357); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                Token temp = getLastToken();
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(8)).eContents().get(1)).eContents().get(2)));
                factory.set(result,"template",convert(temp),true);
                ptm.ruleFinished(temp);
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:303:1: ( ')' )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:303:2: ')'
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,18,FOLLOW_18_in_ruleDTemplateBinding366); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(8)).eContents().get(1)).eContents().get(3)));
                ptm.ruleFinished(getLastToken());
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:309:1: ( RULE_ID )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:309:2: RULE_ID
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,RULE_ID,FOLLOW_RULE_ID_in_ruleDTemplateBinding374); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                Token temp = getLastToken();
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(8)).eContents().get(1)).eContents().get(4)));
                factory.set(result,"control",convert(temp),true);
                ptm.ruleFinished(temp);
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:320:1: ( 'to' )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:320:2: 'to'
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,15,FOLLOW_15_in_ruleDTemplateBinding383); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(8)).eContents().get(1)).eContents().get(5)));
                ptm.ruleFinished(getLastToken());
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:326:1: (temp_PathElement= rulePathElement )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:326:2: temp_PathElement= rulePathElement
            {
            if ( backtracking==0 ) {
              ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(8)).eContents().get(1)).eContents().get(6)));
            }
            pushFollow(FOLLOW_rulePathElement_in_ruleDTemplateBinding393);
            temp_PathElement=rulePathElement();
            _fsp--;
            if (failed) return result;
            if ( backtracking==0 ) {
              if (temp_PathElement != null) {
                hasContent = true;
                ptm.setModelElement(temp_PathElement);
                factory.set(result,"path",convert(temp_PathElement),false);
                ptm.ruleFinished(temp_PathElement);
              } else {
                ptm.destroyNode();
              }

            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:338:1: ( ( 'match' ) (temp_Validator= ruleValidator ) )?
            int alt4=2;
            int LA4_0 = input.LA(1);

            if ( (LA4_0==16) ) {
                alt4=1;
            }
            switch (alt4) {
                case 1 :
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:338:2: ( 'match' ) (temp_Validator= ruleValidator )
                    {
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:338:2: ( 'match' )
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:338:3: 'match'
                    {
                    if ( backtracking==0 ) {
                      skipCurrentToken = false;
                    }
                    match(input,16,FOLLOW_16_in_ruleDTemplateBinding402); if (failed) return result;
                    if ( backtracking==0 ) {
                      if (!skipCurrentToken) {
                        hasContent = true;
                        ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(8)).eContents().get(1)).eContents().get(7)).eContents().get(0)));
                        ptm.ruleFinished(getLastToken());
                      }
                    }

                    }

                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:344:1: (temp_Validator= ruleValidator )
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:344:2: temp_Validator= ruleValidator
                    {
                    if ( backtracking==0 ) {
                      ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(8)).eContents().get(1)).eContents().get(7)).eContents().get(1)));
                    }
                    pushFollow(FOLLOW_ruleValidator_in_ruleDTemplateBinding412);
                    temp_Validator=ruleValidator();
                    _fsp--;
                    if (failed) return result;
                    if ( backtracking==0 ) {
                      if (temp_Validator != null) {
                        hasContent = true;
                        ptm.setModelElement(temp_Validator);
                        factory.set(result,"validator",convert(temp_Validator),false);
                        ptm.ruleFinished(temp_Validator);
                      } else {
                        ptm.destroyNode();
                      }

                    }

                    }


                    }
                    break;

            }


            }

            if ( backtracking==0 ) {
              if (!hasContent)
                result = null;
            }

            }

        }
        catch (RecognitionException re) {
            if (!hasContent)
                result = null;
            reportError(re);
            recover(input,re);
        }
        finally {
            if ( backtracking>0 ) { memoize(input, 5, ruleDTemplateBinding_StartIndex); }
        }
        return result;
    }
    // $ANTLR end ruleDTemplateBinding


    // $ANTLR start rulePathElement
    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:364:1: rulePathElement returns [EObject result] : ( ( RULE_ID ) ( ( '.' ) (temp_PathElement= rulePathElement ) )? ) ;
    public EObject rulePathElement() throws RecognitionException {
        EObject result = null;
        int rulePathElement_StartIndex = input.index();
        EObject temp_PathElement = null;


        boolean hasContent = false;
        try {
            if ( backtracking>0 && alreadyParsedRule(input, 6) ) { return result; }
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:367:4: ( ( ( RULE_ID ) ( ( '.' ) (temp_PathElement= rulePathElement ) )? ) )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:367:4: ( ( RULE_ID ) ( ( '.' ) (temp_PathElement= rulePathElement ) )? )
            {
            if ( backtracking==0 ) {

              				result = factory.create("db", "PathElement");
              			 
            }
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:370:1: ( ( RULE_ID ) ( ( '.' ) (temp_PathElement= rulePathElement ) )? )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:370:2: ( RULE_ID ) ( ( '.' ) (temp_PathElement= rulePathElement ) )?
            {
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:370:2: ( RULE_ID )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:370:3: RULE_ID
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,RULE_ID,FOLLOW_RULE_ID_in_rulePathElement455); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                Token temp = getLastToken();
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(9)).eContents().get(1)).eContents().get(0)));
                factory.set(result,"attribute",convert(temp),true);
                ptm.ruleFinished(temp);
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:381:1: ( ( '.' ) (temp_PathElement= rulePathElement ) )?
            int alt5=2;
            int LA5_0 = input.LA(1);

            if ( (LA5_0==19) ) {
                alt5=1;
            }
            switch (alt5) {
                case 1 :
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:381:2: ( '.' ) (temp_PathElement= rulePathElement )
                    {
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:381:2: ( '.' )
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:381:3: '.'
                    {
                    if ( backtracking==0 ) {
                      skipCurrentToken = false;
                    }
                    match(input,19,FOLLOW_19_in_rulePathElement465); if (failed) return result;
                    if ( backtracking==0 ) {
                      if (!skipCurrentToken) {
                        hasContent = true;
                        ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(9)).eContents().get(1)).eContents().get(1)).eContents().get(0)));
                        ptm.ruleFinished(getLastToken());
                      }
                    }

                    }

                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:387:1: (temp_PathElement= rulePathElement )
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:387:2: temp_PathElement= rulePathElement
                    {
                    if ( backtracking==0 ) {
                      ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(9)).eContents().get(1)).eContents().get(1)).eContents().get(1)));
                    }
                    pushFollow(FOLLOW_rulePathElement_in_rulePathElement475);
                    temp_PathElement=rulePathElement();
                    _fsp--;
                    if (failed) return result;
                    if ( backtracking==0 ) {
                      if (temp_PathElement != null) {
                        hasContent = true;
                        ptm.setModelElement(temp_PathElement);
                        factory.set(result,"next",convert(temp_PathElement),false);
                        ptm.ruleFinished(temp_PathElement);
                      } else {
                        ptm.destroyNode();
                      }

                    }

                    }


                    }
                    break;

            }


            }

            if ( backtracking==0 ) {
              if (!hasContent)
                result = null;
            }

            }

        }
        catch (RecognitionException re) {
            if (!hasContent)
                result = null;
            reportError(re);
            recover(input,re);
        }
        finally {
            if ( backtracking>0 ) { memoize(input, 6, rulePathElement_StartIndex); }
        }
        return result;
    }
    // $ANTLR end rulePathElement


    // $ANTLR start ruleValidator
    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:407:1: ruleValidator returns [EObject result] : temp_concretevalidator= ruleConcreteValidator ;
    public EObject ruleValidator() throws RecognitionException {
        EObject result = null;
        int ruleValidator_StartIndex = input.index();
        EObject temp_concretevalidator = null;


        try {
            if ( backtracking>0 && alreadyParsedRule(input, 7) ) { return result; }
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:409:9: (temp_concretevalidator= ruleConcreteValidator )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:409:9: temp_concretevalidator= ruleConcreteValidator
            {
            pushFollow(FOLLOW_ruleConcreteValidator_in_ruleValidator514);
            temp_concretevalidator=ruleConcreteValidator();
            _fsp--;
            if (failed) return result;
            if ( backtracking==0 ) {
              result =temp_concretevalidator;
            }

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
            if ( backtracking>0 ) { memoize(input, 7, ruleValidator_StartIndex); }
        }
        return result;
    }
    // $ANTLR end ruleValidator


    // $ANTLR start ruleConcreteValidator
    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:411:1: ruleConcreteValidator returns [EObject result] : temp_patternvalidator= rulePatternValidator ;
    public EObject ruleConcreteValidator() throws RecognitionException {
        EObject result = null;
        int ruleConcreteValidator_StartIndex = input.index();
        EObject temp_patternvalidator = null;


        try {
            if ( backtracking>0 && alreadyParsedRule(input, 8) ) { return result; }
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:413:9: (temp_patternvalidator= rulePatternValidator )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:413:9: temp_patternvalidator= rulePatternValidator
            {
            pushFollow(FOLLOW_rulePatternValidator_in_ruleConcreteValidator539);
            temp_patternvalidator=rulePatternValidator();
            _fsp--;
            if (failed) return result;
            if ( backtracking==0 ) {
              result =temp_patternvalidator;
            }

            }

        }
        catch (RecognitionException re) {
            reportError(re);
            recover(input,re);
        }
        finally {
            if ( backtracking>0 ) { memoize(input, 8, ruleConcreteValidator_StartIndex); }
        }
        return result;
    }
    // $ANTLR end ruleConcreteValidator


    // $ANTLR start rulePatternValidator
    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:415:1: rulePatternValidator returns [EObject result] : ( ( 'pattern' ) ( RULE_STRING ) ( ( 'warning' ) | ( 'error' ) ) ( ':' ) ( RULE_STRING ) ) ;
    public EObject rulePatternValidator() throws RecognitionException {
        EObject result = null;
        int rulePatternValidator_StartIndex = input.index();
        boolean hasContent = false;
        try {
            if ( backtracking>0 && alreadyParsedRule(input, 9) ) { return result; }
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:418:4: ( ( ( 'pattern' ) ( RULE_STRING ) ( ( 'warning' ) | ( 'error' ) ) ( ':' ) ( RULE_STRING ) ) )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:418:4: ( ( 'pattern' ) ( RULE_STRING ) ( ( 'warning' ) | ( 'error' ) ) ( ':' ) ( RULE_STRING ) )
            {
            if ( backtracking==0 ) {

              				result = factory.create("db", "PatternValidator");
              			 
            }
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:421:1: ( ( 'pattern' ) ( RULE_STRING ) ( ( 'warning' ) | ( 'error' ) ) ( ':' ) ( RULE_STRING ) )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:421:2: ( 'pattern' ) ( RULE_STRING ) ( ( 'warning' ) | ( 'error' ) ) ( ':' ) ( RULE_STRING )
            {
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:421:2: ( 'pattern' )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:421:3: 'pattern'
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,20,FOLLOW_20_in_rulePatternValidator567); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(0)));
                ptm.ruleFinished(getLastToken());
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:427:1: ( RULE_STRING )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:427:2: RULE_STRING
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,RULE_STRING,FOLLOW_RULE_STRING_in_rulePatternValidator575); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                Token temp = getLastToken();
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(1)));
                factory.set(result,"pattern",convert(temp),false);
                ptm.ruleFinished(temp);
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:437:1: ( ( 'warning' ) | ( 'error' ) )
            int alt6=2;
            int LA6_0 = input.LA(1);

            if ( (LA6_0==21) ) {
                alt6=1;
            }
            else if ( (LA6_0==22) ) {
                alt6=2;
            }
            else {
                if (backtracking>0) {failed=true; return result;}
                NoViableAltException nvae =
                    new NoViableAltException("437:1: ( ( 'warning' ) | ( 'error' ) )", 6, 0, input);

                throw nvae;
            }
            switch (alt6) {
                case 1 :
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:437:2: ( 'warning' )
                    {
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:437:2: ( 'warning' )
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:437:3: 'warning'
                    {
                    if ( backtracking==0 ) {
                      skipCurrentToken = false;
                    }
                    match(input,21,FOLLOW_21_in_rulePatternValidator584); if (failed) return result;
                    if ( backtracking==0 ) {
                      if (!skipCurrentToken) {
                        hasContent = true;
                        ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(2)).eContents().get(0)));
                        ptm.ruleFinished(getLastToken());
                      }
                    }

                    }


                    }
                    break;
                case 2 :
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:443:1: ( 'error' )
                    {
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:443:1: ( 'error' )
                    // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:443:2: 'error'
                    {
                    if ( backtracking==0 ) {
                      skipCurrentToken = false;
                    }
                    match(input,22,FOLLOW_22_in_rulePatternValidator594); if (failed) return result;
                    if ( backtracking==0 ) {
                      if (!skipCurrentToken) {
                        hasContent = true;
                        Token temp = getLastToken();
                        ptm.createNode(((EObject)((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(2)).eContents().get(1)));
                        factory.set(result,"error",true);
                        ptm.ruleFinished(temp);
                      }
                    }

                    }


                    }
                    break;

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:454:1: ( ':' )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:454:2: ':'
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,11,FOLLOW_11_in_rulePatternValidator604); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(3)));
                ptm.ruleFinished(getLastToken());
              }
            }

            }

            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:460:1: ( RULE_STRING )
            // ..//org.eclipsecon.dui.dsl.binding/src-gen/org/eclipsecon/dui/dsl/binding/parser/bind.g:460:2: RULE_STRING
            {
            if ( backtracking==0 ) {
              skipCurrentToken = false;
            }
            match(input,RULE_STRING,FOLLOW_RULE_STRING_in_rulePatternValidator612); if (failed) return result;
            if ( backtracking==0 ) {
              if (!skipCurrentToken) {
                hasContent = true;
                Token temp = getLastToken();
                ptm.createNode(((EObject)((EObject)((EObject)xtextfile.eContents().get(12)).eContents().get(1)).eContents().get(4)));
                factory.set(result,"message",convert(temp),false);
                ptm.ruleFinished(temp);
              }
            }

            }


            }

            if ( backtracking==0 ) {
              if (!hasContent)
                result = null;
            }

            }

        }
        catch (RecognitionException re) {
            if (!hasContent)
                result = null;
            reportError(re);
            recover(input,re);
        }
        finally {
            if ( backtracking>0 ) { memoize(input, 9, rulePatternValidator_StartIndex); }
        }
        return result;
    }
    // $ANTLR end rulePatternValidator


 

    public static final BitSet FOLLOW_ruleDModel_in_parse67 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_parse78 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_10_in_ruleDModel104 = new BitSet(new long[]{0x0000000000000800L});
    public static final BitSet FOLLOW_11_in_ruleDModel111 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_STRING_in_ruleDModel120 = new BitSet(new long[]{0x0000000000001000L});
    public static final BitSet FOLLOW_12_in_ruleDModel129 = new BitSet(new long[]{0x0000000000000800L});
    public static final BitSet FOLLOW_11_in_ruleDModel136 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_STRING_in_ruleDModel145 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_13_in_ruleDModel154 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleDModel162 = new BitSet(new long[]{0x0000000000004002L});
    public static final BitSet FOLLOW_ruleDBinding_in_ruleDModel174 = new BitSet(new long[]{0x0000000000004002L});
    public static final BitSet FOLLOW_ruleDControlBinding_in_ruleDBinding211 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleDTemplateBinding_in_ruleDBinding226 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_14_in_ruleDControlBinding254 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleDControlBinding262 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleDControlBinding271 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_rulePathElement_in_ruleDControlBinding281 = new BitSet(new long[]{0x0000000000010002L});
    public static final BitSet FOLLOW_16_in_ruleDControlBinding290 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_ruleValidator_in_ruleDControlBinding300 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_14_in_ruleDTemplateBinding342 = new BitSet(new long[]{0x0000000000020000L});
    public static final BitSet FOLLOW_17_in_ruleDTemplateBinding349 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleDTemplateBinding357 = new BitSet(new long[]{0x0000000000040000L});
    public static final BitSet FOLLOW_18_in_ruleDTemplateBinding366 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_RULE_ID_in_ruleDTemplateBinding374 = new BitSet(new long[]{0x0000000000008000L});
    public static final BitSet FOLLOW_15_in_ruleDTemplateBinding383 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_rulePathElement_in_ruleDTemplateBinding393 = new BitSet(new long[]{0x0000000000010002L});
    public static final BitSet FOLLOW_16_in_ruleDTemplateBinding402 = new BitSet(new long[]{0x0000000000100000L});
    public static final BitSet FOLLOW_ruleValidator_in_ruleDTemplateBinding412 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_RULE_ID_in_rulePathElement455 = new BitSet(new long[]{0x0000000000080002L});
    public static final BitSet FOLLOW_19_in_rulePathElement465 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_rulePathElement_in_rulePathElement475 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_ruleConcreteValidator_in_ruleValidator514 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_rulePatternValidator_in_ruleConcreteValidator539 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_20_in_rulePatternValidator567 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_STRING_in_rulePatternValidator575 = new BitSet(new long[]{0x0000000000600000L});
    public static final BitSet FOLLOW_21_in_rulePatternValidator584 = new BitSet(new long[]{0x0000000000000800L});
    public static final BitSet FOLLOW_22_in_rulePatternValidator594 = new BitSet(new long[]{0x0000000000000800L});
    public static final BitSet FOLLOW_11_in_rulePatternValidator604 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_RULE_STRING_in_rulePatternValidator612 = new BitSet(new long[]{0x0000000000000002L});

}